<{extend name="public/base"}>
<{block name="head_source"}>
<style type="text/css">
    .navigation-intend td:nth-child(1){
        padding-left:20px;
    }
</style>
<{/block}>
<{block name="content"}>

<div class="box">
    <div class="box-header">
        <h3 class="box-title"><{$title}></h3>
    </div>
    <!-- /.box-header -->
    <div class="box-body">

        <div class="row">
            <div class="col-sm-6">
                <!--<div class="dataTables_length" id="example1_length">
                    <label>Show
                        <select name="example1_length" aria-controls="example1" class="form-control input-sm">
                        <option value="10">10</option>
                        <option value="25">25</option>
                        <option value="50">50</option>
                        <option value="100">100</option>
                    </select> entries
                    </label>
                </div>-->
                <a class="btn  btn-primary" href="<{:url('admin/exhibition/add')}>">
                    新增
                </a>
            </div>

        </div>

        <table id="example1" class="table table-bordered table-striped">
            <thead>
            <tr>
                <{foreach name="column" id="item" key="k"}>
                <th><{$item}></th>
                <{/foreach}>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <{volist name="model" id="item"}>
            <tr>
                <{foreach name="column" id="ii" key="kk"}>
                <td><{$item[$k]}></td>
                <{/foreach}>
                <td>
                    <a href="<{:url('admin/exhibition/edit',array('id'=>$item['id']))}>" class="btn btn-primary btn-sm">编辑</a>
                    <a href="<{:url('admin/exhibition/delete',array('id'=>$item['id']))}>" class="btn btn-danger btn-sm">删除</a>
                </td>
            </tr>
            <{if condition="isset($item['sub'])"}>
            <{volist name="item.sub" id="item2"}>
            <tr class="navigation-intend">
                <{foreach name="column" id="iii" key="kkk"}>
                <td><{$item2[$kkk]}></td>
                <{/foreach}>
                <td>
                    <a href="<{:url('admin/exhibition/edit',array('id'=>$item2['id']))}>" class="btn btn-primary btn-sm">编辑</a>
                    <a href="<{:url('admin/exhibition/delete',array('id'=>$item2['id']))}>" class="btn btn-danger btn-sm">删除</a>
                </td>
            </tr>
            <{/volist}>
            <{/if}>
            <{/volist}>

            </tbody>
            <tfoot>
            <tr>
                <{foreach name="column" id="item" key="k"}>
                <th><{$item}></th>
                <{/foreach}>
                <th>操作</th>
            </tr>
            </tfoot>
        </table>
        <div><{$model->render()}></div>

    </div>
    <!-- /.box-body -->
</div>

<{/block}>
